package com.wyy.web;

import com.wyy.pojo.Articles;
import com.wyy.pojo.LikeArticle;
import com.wyy.pojo.model.ArticleQueryCriteria;
import com.wyy.pojo.model.LabelSearch;
import com.wyy.response.CommonReturnType;
import org.springframework.stereotype.Component;

/**
 * @program: gytcb
 * @author: 吴磊
 * @create: 2021-06-28 13:53
 */
@Component
public class ArticleFeignActionFallBack implements ArticleFeignAction {
    /**
     * 获取热门的文章标签
     *
     * @return
     */
    @Override
    public CommonReturnType getHotArticleLabel() {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 根据内容模糊查询文章
     *
     * @param articles
     * @return
     */
    @Override
    public CommonReturnType getArticleByArticleContentLikeSearch(Articles articles) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 根据文章Id查询文章
     *
     * @param articles
     * @return
     */
    @Override
    public CommonReturnType getArticleByArticleId(Articles articles) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 用户发布文章
     *
     * @param articles
     * @return
     */
    @Override
    public CommonReturnType tokenInsertArticle(Articles articles) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 通过文章Id删除文章及其一切相关
     *
     * @param articleId
     * @return
     */
    @Override
    public CommonReturnType tokenDeleteArticleByArticleId(String articleId) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 编辑帖子
     *
     * @param articles
     * @return
     */
    @Override
    public CommonReturnType tokenUpdateArticle(Articles articles) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 点赞或取消点赞
     *
     * @param likeArticle
     * @return
     */
    @Override
    public CommonReturnType tokenLikeOrCancelLikeArticle(LikeArticle likeArticle) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 通过一些条件获取帖子
     *
     * @param articleQueryCriteria
     * @return
     */
    @Override
    public CommonReturnType getArticleBySomething(ArticleQueryCriteria articleQueryCriteria) {
        return CommonReturnType.create("服务降级");
    }

    /**
     * 通过文章标签模糊查询文章
     *
     * @param labelSearch
     * @return
     */
    @Override
    public CommonReturnType getArticleBySearchLabel(LabelSearch labelSearch) {
        return CommonReturnType.create("服务降级");
    }
}
